Last Updated: 2021-08-12 1:35:04 UTC

1 Research Title

“Detecting life-threatening patterns in Point-of-care ECG using efficient memory and processor power.”

1.1 Author

Francisco Bischoff

1.2 Key-words

anomaly detection, ECG, fading factors, matrix profile, time series, point-of-care

2 Abstract

Currently, Point-of-Care (POC) ECG monitoring works either as plot devices or alarms for abnormal cardiac rhythms using predefined normal trigger ranges and some rhythm analysis, which raises the problem of false alarms. In comparison, complex 12-derivation ECG machines are not suitable to use as simple monitors and are used with strict techniques for formal diagnostics. We aim to identify, on streaming data, life-threatening hearth electric patterns to reduce the number of false alarms, using low CPU and memory maintaining robustness. The study design is comparable to a diagnostic study, where high accuracy is essential. Physionet’s 2015 challenge yielded very good algorithms for reducing false alarms. However, none of the authors reported benchmarks, memory usage, robustness test, or context invariance that could assure its implementation on real monitors to reduce alarm fatigue indeed. We expect to identify the obstacles of detecting life-threatening ECG changes within memory, space, and CPU constraints and to reduce ECG monitor’s false alarms using the proposed methodology, and assess the feasibility of implementing the algorithm in the real world and other settings than ICU monitors.

3 Introduction

Currently, Point-of-Care (POC) ECG monitoring works either as plot devices or alarms for abnormal cardiac rhythms using predefined normal trigger ranges. Modern devices also incorporate algorithms to analyze arrhythmias improving their specificity. On the other hand, full 12-derivation ECG machines are complex, are not suited to use as simple monitors, and are used with strict techniques for formal diagnostics of hearth electric conduction pathologies. The automatic diagnostics are derived from a complete analysis of the 12-dimension data after it is fully and well collected. Both systems do not handle disconnected leads and patient’s motions, being strictly necessary to have a good and stable signal to allow proper diagnosis. These interferences with the data collection frequently originate false alarms increasing both patient and staff’s stress; depending on how it is measured, the rate of false alarms (overall) in ICU is estimated at 65 to 95%1.

Alarm fatigue is a well-known problem that consists of a sensory overload of nurses and clinicians, resulting in desensitization to alarms and missed alarms (the “crying wolf” situation). Patient deaths have been attributed to alarm fatigue2. In 1982, the increase in alarms with “no end in sight”; studies have demonstrated that most alarm signals have no clinical relevance and lead to clinical personnel’s delayed response. Ultimately patient deaths were reported related to inappropriate responses to alarms2.

In April of 2013, The Joint Commission3 issued the Sentinel Event Alert4, establishing alarm system safety as a top hospital priority in the National Patient Safety Goal. Nowadays (2021), the subject still on their list, in fourth place of importance5.

In February of 2015, the CinC/Physionet Challenge 2015 was about “Reducing False Arrhythmia Alarms in the ICU6. The introduction article stated that it had been reported that up to 86% resulting of the alarms are false, and this can lead to decreased staff attention and an increase in patients’ delirium79.

Due to this matter’s importance, this research aims to identify abnormal hearth electric patterns using streaming data, specifically those who are life-threatening, reducing the false alarms, being a reliable signal for Intensive Care Units to respond quickly to those situations.

4 Objectives and the research question

This research aims to identify, on streaming data, abnormal hearth electric patterns, specifically those which are life-threatening, to be a reliable signal for Intensive Care Units to respond quickly to those situations. It also may be able to continuously analyze new data and correct itself shutting off false alarms.

As it is known, this goal is not a new problem, so the main questions to solve are: (1) Can we reduce the number of false alarms in the ICU setting? (2) Can we accomplish this objective using a minimalist approach (low CPU, low memory) while maintaining robustness? (3) Can this approach be used in other health domains other than ICU or ECG?

5 Type of study

This thesis will be a diagnostic study as the algorithm must classify the change in pattern as positive or negative for life-threatening.

6 Current Work Status

6.1 Principles

This research is being conducted using the Research Compendium principles10:

  1. Stick with the convention of your peers;
  2. Keep data, methods, and output separated;
  3. Specify your computational environment as clearly as you can.

Data management is following the FAIR principle (findable, accessible, interoperable, reusable)11.

6.2 The data

The current dataset used is the CinC/Physionet Challenge 2015 public dataset, modified to include only the actual data and the header files in order to be read by the pipeline and is hosted by Zenodo12 under the same license as Physionet.

The dataset is composed of 750 patients with at least five minutes records. All signals have been resampled (using anti-alias filters) to 12 bit, 250 Hz and have had FIR band-pass (0.05 to 40Hz) and mains notch filters applied to remove noise. Pacemaker and other artifacts still present on the ECG6. Furthermore, this dataset contains at least two ECG derivations and one or more variables like arterial blood pressure, photoplethysmograph readings, and respiration movements.

The event we seek to improve is the detection of a life-threatening arrhythmia as defined by Physionet in Table 6.1.

Table 6.1: Definition of the five alarm types used in CinC/Physionet Challenge 2015.
Alarm Definition
Asystole No QRS for at least 4 seconds
Extreme Bradycardia Heart rate lower than 40 bpm for 5 consecutive beats
Extreme Tachycardia Heart rate higher than 140 bpm for 17 consecutive beats
Ventricular Tachycardia 5 or more ventricular beats with heart rate higher than 100 bpm
Ventricular Flutter/Fibrillation Fibrillatory, flutter, or oscillatory waveform for at least 4 seconds

The fifth minute is precisely where the alarm has been triggered on the original recording set. To meet the ANSI/AAMI EC13 Cardiac Monitor Standards13, the onset of the event is within 10 seconds of the alarm (i.e., between 4:50 and 5:00 of the record). That doesn’t mean that there are no other arrhythmias before, but those were not labeled.

6.3 Workflow

All steps of the process are being managed using the R package targets14 from data extraction to the final report, as shown in Fig. 6.1.

Reproducible research workflow using `targets`.

Figure 6.1: Reproducible research workflow using targets.

The report is available on the main webpage15, allowing inspection of previous versions managed by the R package workflowr16, as shown in Fig. 6.2.

Reproducible reports using `workflowr`.

Figure 6.2: Reproducible reports using workflowr.

6.4 Work in Progress

6.4.1 Project start

The project started with a literature survey on the databases Scopus, Pubmed, Web of Science, and Google Scholar with the following query (the syntax was adapted for each database):


TITLE-ABS-KEY ( algorithm OR ‘point of care’ OR ‘signal processing’ OR ‘computer assisted’ OR ‘support vector machine’ OR ‘decision support system’ OR ’neural network’ OR ‘automatic interpretation’ OR ‘machine learning’) AND TITLE-ABS-KEY ( electrocardiography OR cardiography OR ‘electrocardiographic tracing’ OR ecg OR electrocardiogram OR cardiogram ) AND TITLE-ABS-KEY ( ‘Intensive care unit’ OR ‘cardiologic care unit’ OR ‘intensive care center’ OR ‘cardiologic care center’ )

The inclusion and exclusion criteria were defined as in Table 6.2.

Table 6.2: Literature review criteria.
Inclusion criteria Exclusion criteria
ECG automatic interpretation Manual interpretation
ECG anomaly detection Publication older than ten years
ECG context change detection Do not attempt to identify life-threatening arrhythmias, namely asystole, extreme bradycardia, extreme tachycardia, ventricular tachycardia, and ventricular flutter/fibrillation
Online Stream ECG analysis No performance measurements reported
Specific diagnosis (like a flutter, hyperkalemia, etc.)

The current stage of the review is on Data Extraction, from the resulting screening shown in Fig. 6.3.

Prisma results

Figure 6.3: Prisma results

Meanwhile, the project pipeline has been set up on GitHub, Inc.17 leveraging on Github A ions18 for the Continuous Integration lifecycle, the repository is available at17, and the resulting report is available at15 for transparency while the roadmap and tasks are managed using the integrated Zenhub19.

As it is known worldwide, 2020 was hard on every project, which required changes on the timeline. In Fig. 6.4 it is shown the initial roadmap (as of May 2020) and Fig. 6.5 the modified roadmap (as of July 2021).

Roadmap original

Figure 6.4: Roadmap original

Roadmap updated

Figure 6.5: Roadmap updated

6.4.2 Preliminary Experimentations

RAW Data

While programming the pipeline for the current dataset, it has been acquired a Single Lead Heart Rate Monitor breakout from SparkfunTM20 using the AD823221 microchip from Analog Devices Inc., compatible with Arduino(R)22, for an in-house experiment (Figs. 6.6 and 6.7).

Single Lead Heart Rate Monitor

Figure 6.6: Single Lead Heart Rate Monitor

Single Lead Heart Rate Monitor

Figure 6.7: Single Lead Heart Rate Monitor

The output gives us a RAW signal as shown in Fig. 6.8.

RAW output from Arduino at ~300hz

Figure 6.8: RAW output from Arduino at ~300hz

After applying the same settings as the Physionet database (collecting the data at 500hz, resample to 250hz, pass-filter, and notch filter), the signal is much better as shown in Fig. 6.9. Note: the leads were not placed on the correct location.

Gray is RAW, Red is filtered

Figure 6.9: Gray is RAW, Red is filtered

So in this way, we allow us to import RAW data from other devices and build our own test dataset in the future.

Detecting Regime Changes

The regime change approach will be using the Arc Counts, as explained elsewhere23. The current implementation of the Matrix Profile in R, maintained by the first author of this thesis, is being used to accomplish the computations. This package was published in R Journal24.

A new concept was needed to be implemented on the algorithm in order to emulate (in this first iteration) the behavior of the real-time sensor: the search must only look for previous information within a time constraint. Thus, both the Matrix Profile computation and the Arc Counts needed to be adapted for this task.

At the same time, the ECG data needs to be “cleaned” for proper evaluation. That is different from the initial filtering process. Several SQIs (Signal Quality Indexes) are used on literature25, some trivial measures as kurtosis, skewness, median local noise level, other more complex as pcaSQI (the ratio of the sum of the five largest eigenvalues associated with the principal components over the sum of all eigenvalues obtained by principal component analysis applied to the time aligned ECG segments in the window). By experimentation (yet to be validated), a simple formula gives us the “complexity” of the signal and correlates well with the noisy data is shown in Equation (6.1).

\[\begin{equation} \sqrt{\sum_{i=1}^w((x_{i+1}-x_i)^2)}, \quad \text{where}\; w \; \text{is the window size} \tag{6.1} \end{equation}\]



The Fig. 6.10 shows some SQIs.

Green line is the "complexity" of the signal

Figure 6.10: Green line is the “complexity” of the signal

Finally, a sample of the regime change detection is shown in Figs. 6.11 to 6.13.

Fig. 6.11 shows that noisy data (probably patient muscle movements) are marked with a blue point and thus are ignored by the algorithm. Also, valid for the following plots, the green and red lines on the data mark the 10 seconds window where the “event” that triggers the alarm is supposed to happen.a

Regime changes with noisy data - false alarm

Figure 6.11: Regime changes with noisy data - false alarm

In Fig. 6.12, the data is clean; thus, nothing is excluded. Interestingly one of the detected regime changes is inside the “green-red” window. But it is a false alarm.

Regime changes with good data - false alarm

Figure 6.12: Regime changes with good data - false alarm

The last plot (Fig. 6.13) shows the algorithm’s robustness, not excluding good data with a wandering baseline, and the last regime change is correctly detected inside the “green-red” window.

Regime changes with good but wandering data - true alarm

Figure 6.13: Regime changes with good but wandering data - true alarm

6.5 Scientific outcomes

This research has already yielded two R packages concerning the Matrix Profile algorithms from UCR26. The first package is called tsmp, and a paper has also been published in the R Journal24. The journal is indexed in the Science Citation Index Expanded, and according to the Journal Citation Reports, the journal has a 2020 impact factor of 3.984. The second package is called matrixprofiler and improves the first one, using low-level language to improve computational speed. The author has also joined the Matrix Profile Foundation as co-founder together with contributors from Python and Go languages27.

7 Research Team

8 Expected results and outcomes

We expect the following results: (1) Identify the obstacles of identifying life-threatening ECG changes within memory, space, and CPU constraints. (2) Be able to reduce ECG monitor’s false alarms using the proposed methodology. (3) Assess the feasibility of implementing the algorithm in the real world and other settings than ICU monitors.

And outcomes: (1) To achieve a better score of false alarm reduction than the best on Physionet’s 2015 challenge. (2) To push forward the state-of-the-art technology on false alarms reduction, maybe even being domain agnostic. (3) To draw more attention to fading factors as a reliable, fast, and cheap approximation of the true value. (4) To draw more attention to the matrix profile concept as an efficient, agnostic, and almost parameter-free way to analyze time series. (5) To draw more attention of the Patient Monitorization industry on solving the false alarm problem.

References

1.
Donchin Y, Seagull FJ. The hostile environment of the intensive care unit. Current Opinion in Critical Care. 2002;8(4):316-320. doi:10.1097/00075198-200208000-00008
2.
Sendelbach S, Funk M. Alarm Fatigue. AACN Advanced Critical Care. 2013;24(4):378-386. doi:10.4037/nci.0b013e3182a903f9
3.
The joint commission. Published 2021. Accessed April 8, 2021. https://www.jointcommission.org
4.
5.
The joint commission - national patient safety goals. Published 2021. Accessed April 8, 2021. https://www.jointcommission.org/standards/national-patient-safety-goals/hospital-national-patient-safety-goals/
6.
Clifford GD, Silva I, Moody B, et al. The PhysioNet/computing in cardiology challenge 2015: Reducing false arrhythmia alarms in the ICU. In: Computing in Cardiology.; 2015. doi:10.1109/cic.2015.7408639
7.
Lawless ST. Crying wolf: False alarms in a pediatric intensive care unit. Critical care medicine. 1994;22(6):981-985.
8.
Chambrin MC. Alarms in the intensive care unit: How can the number of false alarms be reduced? Critical care (London, England). 2001;5(4):184-188. doi:10.1186/cc1021
9.
Parthasarathy S, Tobin MJ. Sleep in the intensive care unit. Intensive Care Medicine. 2004;30(2):197-206. doi:10.1007/s00134-003-2030-6
10.
Research compendium. Published 2019. Accessed April 8, 2021. https://research-compendium.science
11.
Wilkinson MD, Dumontier M, Aalbersberg IjJ, et al. The FAIR Guiding Principles for scientific data management and stewardship. Scientific Data. 2016;3(1). doi:10.1038/sdata.2016.18
12.
Reducing False Arrhythmia Alarms in the ICU - The PhysioNet Computing in Cardiology Challenge 2015. Published online March 24, 2021. doi:10.5281/zenodo.4634013
13.
Association for the Advancement of Medical Instrumentation. Cardiac monitors, heart rate meters, and alarms. Association for the Advancement of Medical Instrumentation; 2002.
14.
Landau W, Landau W, Warkentin MT, et al. Ropensci/Targets, Dynamic Function-Oriented ’Make’-Like Declarative Workflows. Zenodo; 2021. doi:10.5281/ZENODO.4062936
15.
Franzbischoff/false.alarm: Reproducible reports. Published 2021. Accessed April 8, 2021. https://franzbischoff.github.io/false.alarm
16.
Blischak JD, Carbonetto P, Stephens M. Creating and sharing reproducible research code the workflowr way [version 1; peer review: 3 approved]. F1000Research. 2019;8(1749). doi:10.12688/f1000research.20843.1
17.
Bischoff F. GitHub false.alarm repository. Accessed July 14, 2021. https://github.com/franzbischoff/false.alarm
18.
GitHub Actions. Accessed July 14, 2021. https://github.com/features/actions
19.
20.
SparkFun Electronics. AD8232 single lead heart rate monitor. Published 2014. Accessed July 14, 2021. https://www.sparkfun.com/products/12650
21.
Analog Devices. AD8232 Single-Lead, Heart Rate Monitor Front End. Published online 2014. Accessed July 14, 2021. https://www.analog.com/media/en/technical-documentation/data-sheets/ad8232.pdf
22.
Arduino. Arduino. Published 2008. Accessed July 14, 2021. https://www.arduino.cc/
23.
Gharghabi S, Yeh C-CM, Ding Y, et al. Domain agnostic online semantic segmentation for multi-dimensional time series. Data Mining and Knowledge Discovery. 2018;33(1):96-130. doi:10.1007/s10618-018-0589-3
24.
Bischoff F, Rodrigues PP. tsmp: An R Package for Time Series with Matrix Profile. The R Journal. 2020;12(1):76-86. doi:10.32614/RJ-2020-021
25.
Eerikainen LM, Vanschoren J, Rooijakkers MJ, Vullings R, Aarts RM. Decreasing the false alarm rate of arrhythmias in intensive care using a machine learning approach. In: IEEE; 2015. doi:10.1109/cic.2015.7408644
26.
UCR Matrix Profile Page. Accessed January 27, 2022. https://www.cs.ucr.edu/~eamonn/MatrixProfile.html
27.
Matrix Profile Foundation. Accessed January 27, 2022. https://matrixprofile.org/